# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kcrash
pkgver=5.73.0
pkgrel=0
pkgdesc="Support for application crash analysis and bug report from apps"
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later"
depends_dev="kcoreaddons-dev kwindowsystem-dev"
makedepends="$depends_dev extra-cmake-modules doxygen qt5-qttools-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kcrash-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="c4f4fc5b42bc8a5300f26b3da1ccace32b5323b13766cc785e16a8c55f143523870457cd41d534d8d925b66f60d9ab4c1c06cc5537fa50707142d1c98d6a4b6f  kcrash-5.73.0.tar.xz"
